package com.lannuokeji.biz.ac.controller;


import java.io.File;
import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.lannuokeji.base.AController;
import com.lannuokeji.biz.ac.service.ResourcesService;

import io.swagger.annotations.ApiOperation;

/**
 * <p>
 * 权限表 前端控制器
 * </p>
 *
 * @author lannuoTeck
 * @since 2018-03-17
 */
@RestController
@RequestMapping("/ac/resources")
public class ResourcesController extends AController {

	@Resource
	ResourcesService resourcesService;
	
	@ApiOperation(value = "查询当前用户可操作权限")
	@GetMapping()
	public Object listAct() {
		Map<String, Object> m = new HashMap<>();
//		m.put("userid", 1);
		m.put("type", getUser());
		return setSuccessContent(resourcesService.loadUserResources(m));
	}
	
}

